﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Server.Biz;
using Server.Model;

namespace ServerWeb {
    public partial class Home : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {

        }

        protected void btn_Click(Object sender, EventArgs e) {
            CommandService srv = new CommandService();
            Status status = (Status)Enum.Parse(typeof(Status), this.ddlStatus.SelectedValue);
            srv.SetCommand(status, 100, 1, "Lorry");
        }

        protected void btnGetStatus_Click(object sender, EventArgs e)
        {
            CommandService srv = new CommandService();
            this.GridView1.DataSource = srv.GetStatusHistory(100);
            this.DataBind();
        }

        protected void btnTest_Click(object sender, EventArgs e)
        {
            CommandService srv = new CommandService();
            //srv.UpdateStatus(Status.Lock, 100, 1, "Lorry");
        }
    }
}